package oop;

public class SalariedEmployee extends Employee{
    public double monthsalary;
    public SalariedEmployee(String name,int birthmonth,double monthsalary)
    {
        super(name,birthmonth);
        this.monthsalary=monthsalary;
    }
    public double getMonthsalary    (int month)
    {
        return monthsalary;
    }
    public double setSalary(double monthsalary)
    {
        this.monthsalary=monthsalary;
        return monthsalary;
    }
    @Override
    public double getSalary(int month)
    {
        double salary=monthsalary;
        if(month==getBirthmonth()){
            salary+=100;
        }
        return salary;
    }
}
